from django.urls import path
from workflow.views import WorkflowCreateView, WorkflowRoleCreateView, WorkflowListView, WorkflowRetrieveView, \
    WorkflowApprovalNodeCreateView, WorkflowApprovalNodeListView, TaskCreateView, NextReviewerView, TaskListAPIView, \
    TaskRetrieveAPIView

urlpatterns = [
    path('workflow/', WorkflowCreateView.as_view(), name='workflow-create'),
    path('create_workflow_role/', WorkflowRoleCreateView.as_view(), name='workflow-role-create'),
    path('workflow_list/', WorkflowListView.as_view(), name='workflow-list'),
    path('workflow_retrieve/<int:pk>/', WorkflowRetrieveView.as_view(), name='workflow-retrieve'),
    path('create_workflow_approval_node/', WorkflowApprovalNodeCreateView.as_view(), name='workflow-approval-node'
                                                                                          '-create'),
    path('workflow_approval_node_list/', WorkflowApprovalNodeListView.as_view(), name='workflow-approval-node-list'),
    path('task/', TaskCreateView.as_view(), name='task-create'),
    path('next_reviewer/', NextReviewerView.as_view(), name='next-reviewer'),
    path('task_list/', TaskListAPIView.as_view(), name='task-list'),
    path('task_retrieve/<int:pk>/', TaskRetrieveAPIView.as_view(), name='task-retrieve'),
]
